package day020;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class WriterTest {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("D:\\day020\\output.txt");
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入用户名：");
        String name = sc.nextLine();
        System.out.println("请输入密码：");
        String pwd = sc.nextLine();

        fw.write(name);
        fw.write("\r\n");
        fw.write(pwd);

        fw.flush();
        fw.close();
    }
}
